package com.sz.biz.common.contract.service;

import com.sz.common.base.dao.ext.IEnum;

/**
 * Package: com.sz.biz.common.contract.service<br>
 * Function: 合同中类型的枚举类
 * Author: yanhong.xiao.<br>
 * Date: 2017-07-19 16:41:00.
 */
public enum ContTypeEnum implements IEnum {


    CONT_TEMPLATE("1","合同模板"),

    CONT_CONTRACTOR("2","合同");

    private String code;
    private String name;

    ContTypeEnum(String code, String name) {
        this.code = code;
        this.name = name;
    }

    @Override
    public String getCode() {
        return this.code;
    }

    @Override
    public String getName() {
        return this.name;
    }

    public static ContTypeEnum valueOfEnum(String code) {
        ContTypeEnum[] iss = values();
        for (ContTypeEnum cs : iss) {
            if (cs.getCode().equals(code)) {
                return cs;
            }
        }
        return null;
    }

    public static Integer getIntegerCode(ContTypeEnum typeEnum){
        return  Integer.valueOf(typeEnum.getCode());
    }

}
